package com.bennu.common;

/**
 * 基于ThreadLocal封装的工具类，用户保存和修改时获取当前登录用户id
 * 做用范围在一个线程之内
 */
public class BaseContext {
    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void seCurrentId(Long id){
        threadLocal.set( id );
    }
    public static Long getCurrentId(){
        return threadLocal.get();
    }
}
